package 抽象工厂;

/**
 * @author wz<br>
 * @version 1.0<br>
 * @ClassName FactoryProducer
 * @<Description> TODO
 * @date 2021/12/7 18:04<br>
 */
public class FactoryProducer {
  //创建一个工厂创造器/生成器类，通过传递形状或颜色信息来获取工厂

  public static AbstarctFactory getFactory(String choice){

    if(choice.equalsIgnoreCase("SHAPE")){
      return new ShapeFactory();
    } else if(choice.equalsIgnoreCase("COLOR")){
      return new ColorFactory();
    }
    return null;

  }
}
